package com.qfedu.ssm.services.impl;

import com.qfedu.ssm.services.IUserService;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.subject.Subject;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements IUserService {
    public void checkLogin(String userName,String userPwd) throws Exception{
        UsernamePasswordToken token=new UsernamePasswordToken(userName,userPwd);
        Subject subject = SecurityUtils.getSubject();
        subject.login(token);
    }
}
